//
//  LSFollowTestView.h
//  听说弱点强化训练
//
//  Created by 盛超 on 2018/11/5.
//  Copyright © 2018年 盛超. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "LSModelQues.h"
#import "BKAudioPlayer.h"
#import "LSBaseQuesView.h"

@class LSFollowTestView;
@protocol LSFollowTestViewDelegate <NSObject>

- (void)LSFollowReadReAnswer;

- (void)LSFollowReadNext;

- (void)LSFollowReadTest:(LSFollowTestView*)testView RecordingTime:(CGFloat)time TotalTime:(NSInteger)totalTime;//正在录音

- (void)LSFollowReadTestReslut:(NSDictionary*)reslutDict RefText:(NSString*)refText;//提交传值

- (void)LSFollowReadShowZSD:(NSString *)testString;

- (void)LSFollowReadTest:(LSFollowTestView*)testView PauseType:(LSQuesPauseType)pauseType;

- (void)LSFollowReadShowWrongComplteView;//展示错题重做的弹窗

@end

@interface LSFollowTestView : UIView<BKAudioPlayerDelegate>

/*
 试题数据(其中包含时间数据)
 */
@property (nonatomic,strong) LSModelQues *model;
/*
 听说资源库，A00数字化资源库
 */
@property (nonatomic,copy) NSString *from;
/**
 关卡/速度等级
 */
@property (nonatomic,assign) NSInteger speedLayer;

@property (nonatomic,assign) id<LSFollowTestViewDelegate>delegate;

@property (nonatomic,assign) BOOL isReAnswer;//是否重新作答过

@property (nonatomic,assign) LSQuesPauseType pauseType;//暂停状态

@property (nonatomic,strong) LSSoundPlayer *soundPlayer;

/**
 在界面后，释放资源：定时器，音频播放器，录音器
 */
//开始
- (void)start;
- (void)startSecond;
- (void)showPlayerVoice;
- (void)stop;
- (void)pause;
- (void)resume;
- (void)cancelRecordPlay;
//重新开始
- (void)reStartSpeedLayer:(NSInteger)speedLayer;

@end
